package com.cheng.demo.nacos.consumer.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "Config-center")
@RestController
@RequestMapping("/demo/nacos/consumer/config")
public class ConfigGetController {

    @Value("${cheng.netty}")
    public String s;
    @Value("${server.port}")
    public String port;

    @ApiOperation("获取配置中心的配置值")
    @GetMapping("/string")
    public String getString() {
        return "配置中心的值" + s;
    }
}
